package io.renren.modules.demo.dao;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import io.renren.common.dao.BaseDao;
import io.renren.common.entity.XlsCirclePriEntity;
import io.renren.common.entity.XlsUserAwardEntity;
import io.renren.modules.demo.dto.XlsCirclePriDTO;
import io.renren.modules.demo.dto.XlsUserAwardDTO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.math.BigDecimal;

/**
 * 用户奖励表
 *
 * @author Mark sunlightcs@gmail.com
 * @since 1.0.0 2020-03-28
 */
@Mapper
public interface XlsUserAwardDao extends BaseDao<XlsUserAwardEntity> {
    XlsUserAwardEntity selectUserAwardByUserId(@Param("userId") Long userId);

    IPage<XlsUserAwardDTO> queryPage(IPage<XlsUserAwardEntity> page, @Param("ew") Wrapper<XlsUserAwardEntity> queryWrapper);

    void updateAward(@Param("xlsUserId") long xlsUserId,@Param("awardPrice") BigDecimal awardPrice);
}